﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

/// <summary>
/// Summary description for MasterPageBase
/// </summary>
public class MasterPageBase : System.Web.UI.MasterPage
{
	public MasterPageBase()
	{
		//
		// TODO: Add constructor logic here
		//
	}


    //脚本方法

    #region 执行客户端脚本函数 [RegisterClientScriptBlock]
    /// <summary>
    /// 执行客户端脚本函数 [RegisterClientScriptBlock]
    /// </summary>
    /// <param name="scriptBody">脚本体</param>
    protected void ExcuteScript(string scriptBody)
    {
        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", scriptBody, true);
    }
    #endregion

    #region 执行客户端脚本函数 [RegisterStartupScript]
    /// <summary>
    /// 执行客户端脚本函数 [RegisterStartupScript]
    /// </summary>
    /// <param name="scriptBody">脚本体</param>
    protected void ExcuteStartupScript(string scriptBody)
    {
        ScriptManager.RegisterStartupScript(this, this.GetType(), "script", scriptBody, true);
    }
    #endregion

    #region 执行客户端脚本函数 [RegisterOnSubmitStatement]
    /// <summary>
    /// 执行客户端脚本函数 [RegisterOnSubmitStatement]
    /// </summary>
    /// <param name="scriptBody">脚本体</param>
    protected void ExcuteOnSubmitScript(string scriptBody)
    {
        ScriptManager.RegisterOnSubmitStatement(this, this.GetType(), "script", scriptBody);
    }
    #endregion
}